<template>
  <out-line-d :width="370" :height="0" :position="position" :id="element.key" :padding="0" @closeLayer="closeLayer">
    <div class="info">
      <Title title="一企一图" />
      <div class="content">
          <img class="image" :src="`${API_BASE_URL}/api/erpmng/sys/common/static/${element.data.picture}`"/>
      </div>
    </div>
  </out-line-d>
</template>
<script>
import OutLineD from '@comp/gis/outlined'
import Title from '@comp/gis/title'
import {mapActions} from 'vuex'

export default {
  components: {
    OutLineD,
    Title,
  },
  props: {
    element: {
      type: Object,
      default: () => {
      },
    },
    position: {
      type: Object,
      default: () => {},
    },
  },
  methods: {
    ...mapActions(['deleteDLayers']),
    //关闭图层
    closeLayer() {
      this.deleteDLayers(this.element.key)
    },
  },
}
</script>
<style lang="less" scoped>
.info {
  width: 100%;
  height: auto;
  padding-top: 12px;
  .content {
    width: 100%;
    height: auto;
    padding: 10px;
    .image{
        width: 100%;
        height: auto;
        display: block;
    }
  }
}
</style>